#!/bin/sh

rcount =`ps aux | grep remote_start.sh |grep nohup|wc -l`
if [ $rcount -eq 0 ];then
	exit
fi



while true
do
  count=`ps -ef | grep client_remote | grep client.ini | wc -l`
  echo $count
  if [ $count -eq 0 ];then
  	nohup `/home/wwwroot/pavgps/client_remote -c /home/wwwroot/pavgps/client.ini` 2>&1 >/dev/null &
	echo "run connect remote server..."
  fi
  sleep 1
done



